<!DOCTYPE html>
<html>
	<head lang="en">
		<meta charset="utf-8" />
		<title>个人信息</title>
		<link rel="stylesheet" type="text/css" href="css/public.css"/>
		<link rel="stylesheet" type="text/css" href="css/mygrxx.css" />
	</head>
	<body>
		<!------------------------------head------------------------------>
		<div th:replace="headbing.html"></div>
		<!------------------------------idea------------------------------>
		<div class="address mt">
			<div class="wrapper clearfix">
				<a href="index.html" class="fl">首页</a>
				<span>/</span>
				<a onclick="javaScript:personal()" class="on">个人信息</a>
			</div>
		</div>
		
		<!------------------------------Bott------------------------------>
		<div class="Bott">
			<div class="wrapper clearfix">
				<div th:replace="bott.html"></div>
				<div class="you fl">
					<h2>个人信息</h2>
					<div class="gxin">
						<div class="tx" style="margin-top: 4%"><a href="#" ><img style="width:92px; height:92px; border-radius:100%; overflow:hidden;"   th:src="'http://localhost:8080/tximages/'+${session.tximg}"/><p id="avatar">修改头像</p></a></div>
						<div class="xx">
							<h3 class="clearfix"><strong class="fl">基础资料</strong><a href="#" class="fr" id="edit1">编辑</a></h3>
							<div>昵称：<th:userName th:if="${mygrxx.userName!=null}" th:text="${mygrxx.userName}"/></div>
							<div>生日：<th:birthday th:if="${mygrxx.birthday!=null}" th:text="${#dates.format(mygrxx.birthday,'yyyy-MM-dd')}"/></div>
							<div>性别：<th:gender th:if="${mygrxx.gender!=null}" th:text="${mygrxx.gender}"/></div>
							<!--<h3>高级设置</h3>
							&lt;!&ndash;<div><span class="fl">银行卡</span><a href="#" class="fr">管理</a></div>&ndash;&gt;
							<div><span class="fl">账号地区：中国</span><a href="#" class="fr" id="edit2">修改</a></div>-->
						</div>
					</div>			
				</div>
			</div>
		</div>
		<!--遮罩-->
		<div class="mask"></div>
		<!--编辑弹框-->
		<div class="bj">
			<div class="clearfix"><a href="#" class="fr gb"><img src="img/icon4.png"/></a></div>
			<h3>编辑基础资料</h3>
			<form action="/updatemygrxx" method="post">
				<p><label>昵称：</label><input type="text" name="userName"  th:value="${mygrxx.userName}" /></p>
				<p><label>生日：</label><input type="text" name="birthday2"  th:value="${#dates.format(mygrxx.birthday,'yyyy-MM-dd')}"  /></p>
				<p>
					<label>性别：</label>
					<input type="hidden" name="xb" th:value="${mygrxx.gender}"/>
					<span>
						<input type="radio"  name="gender"  value="男"/>男
					</span>
					<span>
						<input type="radio"  name="gender"  value="女" />女
					</span>
				</p>
				<script>
					var xb = $("[name='xb']").val();
					if(xb=="男"){
						$("[name='gender']:eq(0)").prop("checked",true);
					}else if(xb=="女"){
                        $("[name='gender']:eq(1)").prop("checked",true);
					}
					$("[name='birthday2']").change(function () {
                        var reg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/;
                        var birthday = $(this).val();
                        if(reg.test(birthday)==false){
                            alert("日期格式输入错误!");
                            return false;
						}
                    })
				</script>
				<div class="bc">
					<input type="submit" value="保存"  />
					<input type="button" value="取消" />
				</div>
			</form>
		</div>
		<!--高级设置修改-->
		<div class="xg">
			<div class="clearfix"><a href="#" class="fr gb"><img src="img/icon4.png"/></a></div>
			<h3>切换账号地区</h3>
			<form action="#" method="get">
				<p><label>姓名：</label><input type="text"  value="六六六" /></p>
				<div class="bc">
					<input type="button" value="保存" />
					<input type="button" value="取消" />
				</div>
			</form>
		</div>
		<!--修改头像-->
		<div class="avatar">
			<div class="clearfix"><a href="#" class="fr gb"><img src="img/icon4.png"/></a></div>
			<h3>修改头像</h3>
			<form action="/upload" method="post" class="sc" enctype="multipart/form-data">
				<h4>请上传图片</h4>
				<input type="hidden" name="imgtx" th:value="${session.tximg}">
				<input type="file" name="file1" value="上传头像" />
				<p>jpg或png，大小不超过10M</p>
				<input style="width: 64px;height: 22px;" type="submit" value="提交" />
			</form>
		</div>
		
		<!--返回顶部-->
		<div th:replace="gotop.html"></div>
		<!--footer-->
		<div class="footer">
			<div class="top">
				<div class="wrapper">
					<div class="clearfix">
						<a href="#2" class="fl"><img src="img/foot1.png"/></a>
						<span class="fl">7天无理由退货</span>
					</div>
					<div class="clearfix">
						<a href="#2" class="fl"><img src="img/foot2.png"/></a>
						<span class="fl">15天免费换货</span>
					</div>
					<div class="clearfix">
						<a href="#2" class="fl"><img src="img/foot3.png"/></a>
						<span class="fl">满599包邮</span>
					</div>
					<div class="clearfix">
						<a href="#2" class="fl"><img src="img/foot4.png"/></a>
						<span class="fl">手机特色服务</span>
					</div>
				</div>
			</div>
			<p class="dibu">最家家居&copy;2013-2017公司版权所有 京ICP备080100-44备0000111000号<br />
			违法和不良信息举报电话：400-800-8200，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</p>
		</div>
		<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/public.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/user.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
